<!DOCTYPE html>
<html>
    <head>
        <title><?php echo $title; ?></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        
        <meta name="keywords" content="<?php echo $keywords; ?>" > 
        
        <?php foreach ($styles as $style) : ?>
            <link rel="stylesheet" href="<?php echo $style ?>" type="text/css" media="screen" />
        <?php endforeach; ?>

            <script type="text/javascript">
                var base_url = "<?php echo Url::site(); ?>";
            </script>

        <?php foreach ($scripts as $script) : ?>
                <script type="text/javascript" src="<?php echo $script . '?' . $_SERVER['REQUEST_TIME'] ?>"></script>
        <?php endforeach ?>
            </head>

            <body>

                <div id="wrapper" class="container_12">
                    <div id="banner" class="grid_12 omega">
                        <div class="banner_1">
                            <div class="banner_2">
                                <div id="header">
                                    <div id="logo">
                                        <a href="<?php echo Url::base() ?>" title=""><img src="<?php echo Url::client_assets(); ?>images/logo.jpg" width="296" height="130" border="0" alt="" /></a>
                                    </div>
                                    <div class="top_banner">
                                        <?php echo Request::factory('ads/get_banner/top')->execute() ?>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!--start main-->
                    <div id="main" class="grid_12">

                        <!--  Navigator content  -->
                <?php if ($navigator) {
                    echo $navigator->render();
                } ?>
                <!-- End Navigator -->

                <!-- Mainleft content -->
                <div id="main_left" class="grid_3 alpha omega">
                    <div class="box top">
                        <div class="box_left">
                            <div class="box_right"><span>Hỗ trợ trực tuyến</span></div>
                        </div>
                    </div>
                    <div class="box_1">
                        <ul>
                            <li class="im yahoo"><a href="ymsgr:sendim?<?php echo Lib_Setting::get('yahoo') ?>"></a></li>
                            <li class="im skype"><a href="skype:<?php echo Lib_Setting::get('skype') ?>?chat"></a></li>
                            <li class="img mail"><a href="mailto:<?php echo Lib_Setting::get('email') ?>"></a></li>
                        </ul>
                    </div>

                    <div class="clear"></div>

                    <?php echo Request::factory('article/get_latest')->execute() ?>

                    <?php if ($main_left && is_array($main_left)): ?>
                    <?php foreach ($main_left as $box): ?>
                    <?php echo $box->render(); ?>
                    <?php endforeach; ?>
                    <?php endif; ?>
                    
                    <div class="clear"></div>

                    <div class="box">
                        <div class="box_left">
                            <div class="box_right"><span>Quảng Cáo</span></div>
                        </div>
                    </div>
                    <div class="box_1">
                        <?php echo Request::factory('ads/get_banner/left')->execute() ?>
                    </div>
                    
                    <div class="clear"></div>
                    
                    <div class="box">
                        <div class="box_left">
                            <div class="box_right"><span>GIÁ VÀNG( VND/CHI)</span></div>
                        </div>
                    </div>
                    <div class="box_1">
                        <?php echo Request::factory('ads/get_exchange_service')->execute() ?>
                    </div>
                    
                    <div class="clear"></div>
                        </div>
                        <!-- End mainleft content -->
                        <!-- Begin Slider -->
                        <div id="slider" class="grid_9 omega nivoSlider">
                             <img src="<?php echo Url::client_assets(); ?>images/slider/1.jpg" title="WharfLand - Mang đất Bình Dương đi khoe!" />
                             <img src="<?php echo Url::client_assets(); ?>images/slider/2.jpg" title="Có Đầu Tư - Có Cơ Hội" />
                             <img src="<?php echo Url::client_assets(); ?>images/slider/3.jpg" title="WharfLand - Mang đất Bình Dương đi khoe!" />
                             <img src="<?php echo Url::client_assets(); ?>images/slider/4.jpg" title="Có Đầu Tư - Có Cơ Hội" />
                             <img src="<?php echo Url::client_assets(); ?>images/slider/5.jpg" title="WharfLand - Mang đất Bình Dương đi khoe!" />
                             <img src="<?php echo Url::client_assets(); ?>images/slider/5.jpg" title="Có Đầu Tư - Có Cơ Hội" />
                        </div>
                        <!-- End Slider -->

                        <div id="main_center" class="<?php if (is_null($main_right)) {
                                echo 'full_content';
                            } ?> grid_6">
                    <?php if ($contents && is_array($contents)): ?>
<?php foreach ($contents as $content): ?>
                    <?php echo $content->render(); ?>
<?php endforeach; ?>
<?php endif; ?>

                                    </div>

<?php if (!is_null($main_right)): ?>
                                        <div id="main_right" class="grid_3 alpha omega">

                                            <div class="box" style="margin-top:0"><!--start advertisement-->
                                                <div class="box_left">
                                                    <div class="box_right"><span>Quảng cáo</span></div>
                                                </div>
                                            </div>
                                            <div class="box_1">
                                                <div id="img_advertisement">
                                                <?php echo Request::factory('ads/get_banner/right')->execute() ?>
                                                </div>
                                            </div>
                                            <div class="clear"></div>
                                            



                <?php if (!is_null($main_right) && is_array($main_right)): ?>
<?php foreach ($main_right as $box): ?>
<?php echo $box->render(); ?>
<?php endforeach; ?>
<?php endif; ?>
                                                </div>
<?php endif; ?>

                                                <div class="clear"></div>
                                            </div><!--end main-->
<?php echo Request::factory('ads/get_partner')->execute() ?>

<?php echo $footer; ?>
        </div>

        <script>
        $(function(){
            $('#slider').nivoSlider();
        });
        </script>

    </body>
</html>

